package com.mfin.bom.objects;

// Generated 17 Jun, 2012 11:27:33 PM by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.mfin.enumeration.ChitStatus;

/**
 * ChitMaster generated by hbm2java
 */
@Entity
@Table(name = "chit_master", catalog = "mfindb")
public class ChitMaster implements java.io.Serializable {

	private Long id;
	private String chitName;
	private String description;
	private Double chitValue;
	private Double commision;
	private Short noOfMembers;
	private Short noOfMonths;
	private Double registrationFee;
	private Date startDate;
	private Date endDate;
	private Date auctionDate;
	private String byLawNo;
	private ChitStatus chitStatus;
	private Boolean block;
	private Set<FinanceChit> financeChits = new HashSet<FinanceChit>(0);

	public ChitMaster() {
	}

	public ChitMaster(String chitName, String description, Double chitValue,
			Double commision, Short noOfMembers, Short noOfMonths,
			Double registrationFee, Date startDate, Date endDate,
			Date auctionDate, String byLawNo, ChitStatus chitStatus, Boolean block,
			Set<FinanceChit> financeChits) {
		this.chitName = chitName;
		this.description = description;
		this.chitValue = chitValue;
		this.commision = commision;
		this.noOfMembers = noOfMembers;
		this.noOfMonths = noOfMonths;
		this.registrationFee = registrationFee;
		this.startDate = startDate;
		this.endDate = endDate;
		this.auctionDate = auctionDate;
		this.byLawNo = byLawNo;
		this.chitStatus = chitStatus;
		this.block = block;
		this.financeChits = financeChits;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "CHIT_NAME", length = 23)
	public String getChitName() {
		return this.chitName;
	}

	public void setChitName(String chitName) {
		this.chitName = chitName;
	}

	@Column(name = "DESCRIPTION", length = 50)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "CHIT_VALUE", precision = 22, scale = 0)
	public Double getChitValue() {
		return this.chitValue;
	}

	public void setChitValue(Double chitValue) {
		this.chitValue = chitValue;
	}

	@Column(name = "COMMISION", precision = 22, scale = 0)
	public Double getCommision() {
		return this.commision;
	}

	public void setCommision(Double commision) {
		this.commision = commision;
	}

	@Column(name = "NO_OF_MEMBERS")
	public Short getNoOfMembers() {
		return this.noOfMembers;
	}

	public void setNoOfMembers(Short noOfMembers) {
		this.noOfMembers = noOfMembers;
	}

	@Column(name = "NO_OF_MONTHS")
	public Short getNoOfMonths() {
		return this.noOfMonths;
	}

	public void setNoOfMonths(Short noOfMonths) {
		this.noOfMonths = noOfMonths;
	}

	@Column(name = "REGISTRATION_FEE", precision = 22, scale = 0)
	public Double getRegistrationFee() {
		return this.registrationFee;
	}

	public void setRegistrationFee(Double registrationFee) {
		this.registrationFee = registrationFee;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "START_DATE", length = 19)
	public Date getStartDate() {
		return this.startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "END_DATE", length = 19)
	public Date getEndDate() {
		return this.endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "AUCTION_DATE", length = 19)
	public Date getAuctionDate() {
		return this.auctionDate;
	}

	public void setAuctionDate(Date auctionDate) {
		this.auctionDate = auctionDate;
	}

	@Column(name = "BY_LAW_NO", length = 23)
	public String getByLawNo() {
		return this.byLawNo;
	}

	public void setByLawNo(String byLawNo) {
		this.byLawNo = byLawNo;
	}

	@Column(name = "CHIT_STATUS", length = 7)
	@Enumerated(EnumType.STRING)
	public ChitStatus getChitStatus() {
		return this.chitStatus;
	}

	public void setChitStatus(ChitStatus chitStatus) {
		this.chitStatus = chitStatus;
	}

	@Column(name = "BLOCK", columnDefinition = "BIT")
	public Boolean getBlock() {
		return this.block;
	}

	public void setBlock(Boolean block) {
		this.block = block;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "chitMaster")
	public Set<FinanceChit> getFinanceChits() {
		return this.financeChits;
	}

	public void setFinanceChits(Set<FinanceChit> financeChits) {
		this.financeChits = financeChits;
	}

}
